/**
 *
 */
package com.googlecode.bip.entity;

import java.util.Comparator;

/**
 * Compare 2 Integer
 * @author Claude CHOISNET
 */
class IntegerComparator implements Comparator<Integer>
{
    /**
     * Compare 2 Integer objects
     * @param i0 first Integer, could be null
     * @param i1 second Integer, could be null
     * @return 0 if Integer have same value or are both null
     */
    public static final int compareInteger( final Integer i0, final Integer i1 )
    {
        return StringComparator.compareObject( i0, i1 );
    }

    @Override
    public int compare( final Integer i0, final Integer i1 )
    {
        return compareInteger( i0, i1 );
    }

}
